import request from '@/utils/request'

// 查询库存盘点列表
export function listStoreShelf(query) {
  return request({
    url: '/supplier/storeShelf/list',
    method: 'get',
    params: query
  })
}

// 获取当前单号最大的值+1
export function generateNumber() {
  return request({
    url: '/supplier/businessNumber/generateStoreShelfNumber' ,
    method: 'get'
  })
}

// 查询库存盘点详细
export function getStoreShelf(id) {
  return request({
    url: '/supplier/storeShelf/' + id,
    method: 'get'
  })
}

// 新增库存盘点
export function addStoreShelf(data) {
  return request({
    url: '/supplier/storeShelf',
    method: 'post',
    data: data
  })
}

// 修改库存盘点
export function updateStoreShelf(data) {
  return request({
    url: '/supplier/storeShelf',
    method: 'put',
    data: data
  })
}

// 删除库存盘点
export function delStoreShelf(id) {
  return request({
    url: '/supplier/storeShelf/' + id,
    method: 'delete'
  })
}

// 导出库存盘点
export function exportStoreShelf(query) {
  return request({
    url: '/supplier/storeShelf/export',
    method: 'get',
    params: query
  })
}